package com.aftersale.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 
 * @TableName faq
 */
@TableName(value ="faq")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Faq implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 问题名称
     */
    @NotBlank(message = "问题描述不能为空")
    @Size(min = 1,max = 40,message = "问题描述过长")
    private String title;

    /**
     * 解决方法
     */
    @NotBlank(message = "解决方案不能为空")
    @Size(min = 1,max = 2000,message = "解决方案过长")
    private String anser;

    /**
     * 好评数
     */
    private Integer goodNum;

    /**
     * 差评数
     */
    private Integer badNum;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}